package com.robot.common.client;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Data
@Component
public class MinioClient {
    private String endpoint = "http://47.96.231.221:19000";
    private String accessKey = "faqs7AE7LtUirwnBbUX7";
    private String secretKey = "ry8m3IPVgLFzzqaUb62hcokvluFvARNR4nyk1PQU";

    /**
     * 注入minio 客户端
     *
     * @return
     */
    @Bean
    public io.minio.MinioClient client() {

        return io.minio.MinioClient.builder()
                .endpoint(endpoint)
                .credentials(accessKey, secretKey)
                .build();
    }

}
